package cn.jy.map.job;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.jy.map.service.PlasmaStatisticsService;

/**
* @author XiongJing
* @version 1.0
* @date 2018年7月9日 下午4:54:49
* 类说明:定时往redis里面更新缓存
*/
@Service("PlasmaFrequencyJob")
public class PlasmaFrequencyJob {

	@Autowired
	private PlasmaStatisticsService plasmaStatisticsService;
	Logger logger = Logger.getLogger(GjzLcDataLoadJob.class);

	public void work() {
		try {
			logger.info("执行定时任务开始：往Redis更新统计数据....");
			plasmaStatisticsService.insertCollectPlasmaFrequency();
			logger.info("执行定时任务结束：往Redis更新统计数据....");
			logger.info("执行定时任务开始：往Redis更新统计数据....");
			plasmaStatisticsService.insertRoundsOfStatistical();
			plasmaStatisticsService.insertPlasmaSourceMember();
			plasmaStatisticsService.getCurrentYearFrequencyStatistics();
			plasmaStatisticsService.getPlasmaComprehensiveStatisticsResult2();
			logger.info("执行定时任务结束：往Redis更新统计数据....");
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
